using System;
using System.Collections.Generic;
using UnityEngine;

namespace Main.Audio
{
    [CreateAssetMenu(fileName = "SoundDetailsList_SO", menuName = "ScriptableObject/SoundDetailsList_SO", order = 0)]
    public class SoundDetailsList_SO : ZSWF_SOSingleton<SoundDetailsList_SO>
    {
        public List<SoundDetails> soundDetailList;

        public bool TryGetSoundDetails(SoundName soundName, out SoundDetails soundDetails)
        {
            soundDetails = soundDetailList.Find(x => x.soundName == soundName);
            return soundDetails != null;
        }
    }

    [Serializable]
    public class SoundDetails
    {
        public SoundName soundName;
        public AudioClip soundClip;
        [Range(0, 1.2f)] public float soundPitchMin;
        [Range(0, 1.2f)] public float soundPitchMax;
        [Range(0, 1.2f)] public float soundVolume;
    }

}